$("#btn1").click(function() {
    	let str1 = $("#div2 span").text().trim();
    	let array1 = str1.split(",");
    	array1.splice(array1.indexOf("January(1)"), array1.indexOf("January(1)") + 1);
    	$("#div2 span").html(array1.join(","));
    });

    $("#btn2").click(function() {
    	let str1 = $("#div2 span").text().trim();
    	let array1 = str1.split(",");
    	let index = array1.indexOf("December(12)")
    	array1.splice(index, 12);
    	if (index < 0) return;
    	$("#div2 span").html(array1.join(","));
    });

    $("#btn3").click(function() {
    	$("#div4").append($("#div4 span").eq(0).clone());
    });
    $("#btn4").click(function() {
    	$("#div4").html(`<span>0,1,2,3,4,5,6,7,8,9</span>`);
    });
    $("#btn5").click(function() {
    	$("#div6 span").html("red,green,blue,white,yellow,black,brown");
    });


    $("#btn6").click(function() {
    	let str1 = $("#div6 span").html();
    	let array1 = str1.split(",");
    	array1.splice(0, 3);
    	$("#div6 span").html(array1.join(","));
    });
    $("#btn7").click(function() {
    	let str1 = $("#div6 span").html();
    	let array1 = str1.split(",");
    	array1.splice(1, 2);
    	$("#div6 span").html(array1.join(","));
    });
    $("#btn8").click(function() {
    	let str1 = $("#div6 span").html();
    	let array1 = str1.split(",");
    	array1.splice(2, 0, "orange", "purple");
    	$("#div6 span").html(array1.join(","));
    });
    $("#btn9").click(function() {
    	let str1 = $("#div6 span").html();
    	let array1 = str1.split(",");
    	let a = array1[1];
    	let b = array1[2];
    	array1[1] = b;
    	array1[2] = a;
    	$("#div6 span").html(array1.join(","));
    });
